<template>
  <el-container>
    <el-aside width="200px" style="margin-left:20px">
      <div class="tree">
        <el-tree
          :data="data"
          show-checkbox
          node-key="id"
          :props="defaultProps"
        />
      </div>
    </el-aside>
    <el-container style="flex:auto;position: relative;">
      <el-main>
        <h4 style="margin-top:-20px">机构信息</h4>

        <el-form :inline="true" class="demo-form-inline" style="margin-top:20px;color: #000;">
          <el-form-item label="机构编码">
            <el-input />
          </el-form-item>
          <el-form-item label="机构名称">
            <el-input />
          </el-form-item>
          <el-form-item label="机构类型">
            <el-select placeholder="请选择" class="jigou" />
          </el-form-item>
          <el-form-item label="机构地址">
            <el-select placeholder="请选择省" class="city" />
            <el-select placeholder="请选择市" class="prv" />
            <el-select
              placeholder="请选择县/区"
              class="area"
            />
          </el-form-item>
          <el-form-item label="详细地址">
            <el-input />
          </el-form-item>
          <el-form-item label="经度" class="longitude">
            <el-input><span>E</span>
            </el-input>
          </el-form-item>
          <el-form-item label="纬度" class="latitude">
            <el-input> <span>N</span>
            </el-input>
          </el-form-item>
          <el-form-item label="机构负责人" class="people">
            <el-input />
          </el-form-item>
          <el-form-item label="机构电话">
            <el-input />
          </el-form-item>
          <br>
          <el-form-item>
            <el-button type="primary" class="btn">编辑/保存</el-button>
          </el-form-item>
          <!-- <button>编辑</button> -->
        </el-form>
      </el-main>
      <el-footer>
        <h4>员工信息</h4>
        <!-- <div class="img">
          <img src="../../../assets/snipaste_20230531_142646.png" alt="" class="img">
          <div style="margin-left:120px;color:rgb(129, 134, 147);font-size:14px ;">这里空空如也~~
          </div> -->
        <div class="form" style="width:800px;margin-top:20px">
          <el-table
            :data="tableData"
            stripe
            style="width: 100%"
          >
            <el-table-column
              prop="num"
              label="序号"
              width="50"
            />
            <el-table-column
              prop="id"
              label="员工编号"
              width="180"
            />
            <el-table-column
              prop="name"
              label="员工姓名"
            />
            <el-table-column
              prop="tel"
              label="手机号"
            />
            <el-table-column
              prop="organization"
              label="所属机构"
            />   <el-table-column
              prop="account"
              label="系统账户"
            />   <el-table-column
              prop="role"
              label="系统角色"
            />
            <el-table-column
              prop="state"
              label="账号状态"
            />
          </el-table>
          <el-pagination
            :current-page="currentPage4"
            :page-sizes="[5,10,20,40]"
            :page-size="5"
            layout="total, sizes, prev, pager, next, jumper"
            :total="400"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
          />
        </div>
        <!-- </div> -->

      </el-footer>
    </el-container>
  </el-container>
</template>

<script>
export default {
  data() {
    return {
      defaultProps: {
        children: 'children',
        label: 'label'
      },
      data: [
        {
          id: 1,
          label: '东北转运中心'
        }, {
          id: 1,
          label: '华北转运中心'
        },
        {
          id: 1,
          label: '华中转运中心',
          children: [{
            id: 3,
            label: '武汉分拣中心',
            children: [{
              id: 9,
              label: '汉江营业部'
            },
            {
              id: 10,
              label: '武昌营业部'
            }]
          }]
        },
        {
          id: 2,
          label: '华东转运中心',
          children: [{
            id: 3,
            label: '上海分拣中心',
            children: [
              {
                id: 9,
                label: '虹口营业部'
              },
              {
                id: 10,
                label: '浦东新区营业部'
              }
            ] }
          ] },
        {
          id: 3,
          label: '西南转运中心',
          children: [{
            id: 4,
            label: '成都分拣中心',
            children: [
              {
                id: 9,
                label: '青羊区营业部'
              }
            ] }
          ]
        }, {
          id: 1,
          label: '金牛区营业部'
        }, {
          id: 1,
          label: '西安转运中心',
          children: [{
            id: 5,
            label: '碑林区营业部'
          }, {
            id: 6,
            label: '长安区营业部'
          }]
        }
      ],
      // 表单
      tableData: [
        {
          num: '1',
          id: '1111111111111',
          name: '王小虎',
          tel: '111112332',
          organization: '哈哈集团',
          account: '黑户',
          role: '角色',
          state: '正常'
        },
        {
          num: '1',
          id: '1111111111111',
          name: '王小虎',
          tel: '111112332',
          organization: '哈哈集团',
          account: '黑户',
          role: '角色',
          state: '正常'
        },
        {
          num: '1',
          id: '1111111111111',
          name: '王小虎',
          tel: '111112332',
          organization: '哈哈集团',
          account: '黑户',
          role: '角色',
          state: '正常'
        },
        {
          num: '1',
          id: '1111111111111',
          name: '王小虎',
          tel: '111112332',
          organization: '哈哈集团',
          account: '黑户',
          role: '角色',
          state: '正常'
        }

      ],
      // 分页
      currentPage1: 5,
      currentPage2: 5,
      currentPage3: 5,
      currentPage4: 4
    }
  },
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`)
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
    }
  }
}

</script>

<style scoped>
.el-container{
  /* position: relative; */
}
.el-select.jigou::v-deep .el-input--suffix .el-input__inner{
  width: 190px!important;

}
 ::v-deep .el-footer {
    position: relative;
    margin-top: 20px;
    background-color: #fff;
    height: 400px!important;
    z-index: 99;

  }

  .el-aside {
    background-color: #fff;
    color: #333;
    text-align: center;
    line-height: 200px;
    margin-right: 20px;
    position:relative;
    flex: none;

  }

  .el-main {
    background-color: #fff;
    position: relative;

  }
  .container {
  height: 55px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  background-color:rgb(250, 250, 250);
  width: 100%;
  margin-top:-20px ;
  border-bottom:1px solid rgb(235, 238, 245) ;

}

.text {
  font-weight: bold;
  padding-left: 20px;
  line-height: 55px;

}
.box{
  display: flex;
  font-size: 14px;
    color: #000000;
    font-weight:700;
    line-height: 40px;
    height: 40px;
    margin-bottom: 25px;

}
::v-deep .city {
  padding-right: 25px;
    margin-right: 41px;
    width: 217px;

}
::v-deep .prv{
  padding-right: 25px;
  margin-left: 10px;
    width: 217px;
}
::v-deep .area{
  padding-right: 30px;
    margin-left: 50px;
    width: 212px;
}
.el-cascader{
  justify-content: space-around;
  margin-right: 20px;
    margin-left: -10px;
  width: 500px;

}
label {
  margin-right: 10px;
}
::v-deep input{
  width:188px;
  height:40px;
  border-color:1px solid rgb(220, 223, 230);
  z-index: 99;
}
::v-deep .el-form-item__label {
  color:#000000;
}
::v-deep .el-input__inner{
  background-color: rgb(245, 247, 250);
}
::v-deep .longitude{
  margin-left: 30px;
}
::v-deep .latitude{
  margin-left: 30px;

}
::v-deep .people{
  margin-left: -13px;

}
h4{
  /* width: 100%; */
    height: 50px;
    background-color: rgb(250, 250, 250);
    margin-left: -20px;
    line-height: 50px;
    margin-top: 0px;
    padding-left: 20px;
}

::v-deep .btn{
  width: 100px;
  margin-left: 330px;
}
::v-deep .img{
  width: 300px;
  height: 250px;
  /* width: 50%; */
  margin:auto
}
::v-deep .el-pagination .el-select .el-input .el-input__inner {
    padding-right: 25px;
    border-radius: 3px;
    width: 110px;
}
</style>
